package com.rois.librois.RoIS;


/**
* RoIS/ReturnCode_tHelper.java .
* IDL-to-Java コンパイラ (ポータブル), バージョン "3.1" で生成
* 生成元: RoIS_IDL.idl
* 2011年9月8日 0時05分17秒 JST
*/


/******************************************
 enum
******************************************/
abstract public class ReturnCode_tHelper
{
  private static String  _id = "IDL:RoIS/ReturnCode_t:1.0";

  public static void insert (org.omg.CORBA.Any a, com.rois.librois.RoIS.ReturnCode_t that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static com.rois.librois.RoIS.ReturnCode_t extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (com.rois.librois.RoIS.ReturnCode_tHelper.id (), "ReturnCode_t", new String[] { "RoIS_OK", "RoIS_ERROR", "RoIS_BAD_PARAMETER", "RoIS_UNSUPPORTED", "RoIS_OUT_OF_RESOURCES", "RoIS_TIMEOUT"} );
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static com.rois.librois.RoIS.ReturnCode_t read (org.omg.CORBA.portable.InputStream istream)
  {
    return com.rois.librois.RoIS.ReturnCode_t.from_int (istream.read_long ());
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream, com.rois.librois.RoIS.ReturnCode_t value)
  {
    ostream.write_long (value.value ());
  }

}
